<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ include file="../../base.jsp"%>
<!DOCTYPE html>
<html>

<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>数据 - AdminLTE2定制版</title>
    <meta name="description" content="AdminLTE2定制版">
    <meta name="keywords" content="AdminLTE2定制版">
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <!-- 页面meta /-->

    <%--分页--%>
    <%--<script>
        $(function () {
            $("#pageSize").change(function () {
                var pageSize = $("#pageSize").val();
                location.href="${pageContext.request.contextPath}/cargo/shipping/toView.do?&page=1&size="+pageSize;
            })
        })

    </script>--%>

    <%--根据下拉选项进行分页--%>
    <%--<script>
        $(function () {
            //获取下拉选项的所有内容
            var pageSize = document.getElementById("pageSize");
            //获取传递回来的对象中存的size
            var value = "${page.pageSize}";
            /* alert(pageSize.options.length)*/
            //遍历数组
            for(var i=0; i<pageSize.options.length; i++){
                //如果下拉选项的标签体内容与对象中的size一致
                if(pageSize.options[i].text === value){
                    //添加selectd属性
                    pageSize.options[i].selected="selected";
                    break;
                }
            }
        })
    </script>--%>
</head>
<body>
<div id="frameContent" class="content-wrapper" style="margin-left:0px;">
    <!-- 内容头部 -->
    <section class="content-header">
        <h1>
            订单管理
            <small>订单表单</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="/home.do"><i class="fa fa-dashboard"></i> 首页</a></li>

            <li class="active">订单表单</li>
        </ol>
    </section>
    <!-- 内容头部 /-->

    <!-- 正文区域 -->
    <!-- 正文区域 -->
    <!-- 正文区域 -->
    <section class="content">

        <!--委托单信息-->
        <div class="panel panel-default">
            <div class="panel-heading">查看委托单</div>
            <form id="editForm" action="${ctx}/cargo/shipping/edit.do" method="post" >
                <input type="hidden" name="shippingOrderId" value="${shippingOrder.shippingOrderId}">
                <%--<input type="hidden" name="packingListId" value="${shippingOrder.shippingOrderId}" id="packingListId">--%>
                <%--<input type="hidden" name="factoryName" id="factoryName" value="${shipping.factoryName}">--%>
                <div class="row data-type" style="margin: 0px">
                    <div class="col-md-2 title">运送方式</div>
                    <div class="col-md-4 data">
                        <div class="form-group form-inline">
                            <div class="radio"><label><input type="radio" ${shippingOrder.orderType=="海运"?'checked':''} name="orderType" value="海运" disabled="disabled">海运</label></div>
                            <div class="radio"><label><input type="radio" ${shippingOrder.orderType=="空运"?'checked':''} name="orderType" value="空运" disabled="disabled">空运</label></div>
                        </div>
                    </div>

                    <div class="col-md-2 title">货主</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="货主" name="shipper" value="${shippingOrder.shipper}" disabled="disabled">
                    </div>


                    <div class="col-md-2 title">提单抬头</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="提单抬头" name="consignee" value="${shippingOrder.consignee}" disabled="disabled">
                    </div>

                    <div class="col-md-2 title">信用证</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="信用证" name="lcNo" value="${shippingOrder.lcNo}" disabled="disabled">
                    </div>

                    <div class="col-md-2 title">份数</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="份数" name="copyNum" value="${shippingOrder.copyNum}" disabled="disabled">
                    </div>

                    <div class="col-md-2 title">装运港</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="装运港" name="portOfLoading" value="${shippingOrder.portOfLoading}" disabled="disabled">
                    </div>

                    <div class="col-md-2 title">转船港</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="转船港" name="portOfTrans" value="${shippingOrder.portOfTrans}" disabled="disabled">
                    </div>

                    <div class="col-md-2 title">卸货港</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="卸货港" name="portOfDischarge" value="${shippingOrder.portOfDischarge}" disabled="disabled">
                    </div>
                    <div class="col-md-2 title">装货日期</div>
                    <div class="col-md-4 data">
                        <div class="input-group date">
                            <div class="input-group-addon">
                                <i class="fa fa-calendar"></i>
                            </div>
                            <input type="text" placeholder="装货日期"  name="loadingDate" class="form-control pull-right"
                                   value="<fmt:formatDate value="${shippingOrder.loadingDate}" pattern="yyyy-MM-dd"/>" id="loadingDate" disabled="disabled">
                        </div>
                    </div>

                    <div class="col-md-2 title">有效日期</div>
                    <div class="col-md-4 data">
                        <div class="input-group date">
                            <div class="input-group-addon">
                                <i class="fa fa-calendar"></i>
                            </div>
                            <input type="text" placeholder="有效日期"  name="limitDate" class="form-control pull-right"
                                   value="<fmt:formatDate value="${shippingOrder.limitDate}" pattern="yyyy-MM-dd"/>" id="limitDate" disabled="disabled">
                        </div>
                    </div>
                    <div class="col-md-2 title rowHeight2x">运输要求</div>
                    <div class="col-md-4 data  rowHeight2x">
                        <textarea class="form-control" rows="3" placeholder="运输要求" name="specialCondition" disabled="disabled">${shippingOrder.specialCondition}</textarea>
                    </div>

                    <div class="col-md-2 title rowHeight2x">运费说明</div>
                    <div class="col-md-4 data  rowHeight2x">
                        <textarea class="form-control" rows="3" placeholder="运费说明" name="freight" disabled="disabled">${shippingOrder.freight}</textarea>
                    </div>

                    <div class="col-md-2 title">正本通知人</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="正本通知人" name="notifyParty" value="${shippingOrder.notifyParty}" disabled="disabled">
                    </div>

                    <div class="col-md-2 title">复核人</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="复核人" disabled="disabled" name="checkBy" value="${shippingOrder.checkBy}" disabled="disabled">
                    </div>

                    <div class="col-md-2 title">是否分批</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="是否分批" name="isBatch" value="${shippingOrder.isBatch}" disabled="disabled">
                    </div>

                    <div class="col-md-2 title">是否转船</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="是否转船" name="isTrans" value="${shippingOrder.isTrans}" disabled="disabled">
                    </div>

                    <div class="col-md-2 title rowHeight2x">扼要说明</div>
                    <div class="col-md-10 data rowHeight2x">
                        <textarea class="form-control" placeholder="扼要说明" rows="2" name="remark" disabled="disabled">${shippingOrder.remark}</textarea>
                    </div>
                    <div class="col-md-2 title ">运费总价</div>
                    <div class="col-md-10 data ">
                        <input type="text" class="form-control" placeholder="运费总价"  name="freightprice" value= "${shippingOrder.freightprice}" disabled="disabled">
                    </div>
                </div>
            </form>
        </div>
        <!--订单信息/-->

        <!--工具栏-->
        <div class="box-tools text-center">
            <button type="button" class="btn bg-maroon" onclick="history.back(-1);">返回</button>
        </div>
        <!--工具栏/-->

    </section>
    <!-- 正文区域 /-->

    <section class="content">

        <!-- .box-body -->
        <%--<div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title">装箱单列表</h3>
            </div>

            <div class="box-body">

                <!-- 数据表格 -->
                <div class="table-box">
                    <!--数据列表-->
                    <table id="dataList" class="table table-bordered table-striped table-hover dataTable">
                        <thead>
                        <tr>
                            <td class="tableHeader">序号</td>
                            <td class="tableHeader">装箱单号</td>
                            <td class="tableHeader">卖方</td>
                            <td class="tableHeader">买方</td>
                            <td class="tableHeader">发票号</td>
                            <td class="tableHeader">发票日期</td>
                            <td class="tableHeader">唛头</td>
                            <td class="tableHeader">状态</td>
                        </tr>
                        </thead>
                        <tbody class="tableBody" >
                        <c:forEach items="${page.list}" var="o" varStatus="status">
                            <tr>
                                <td>${status.index+1}</td>
                                <td>${o.packingListId}</td>
                                <td>${o.seller}</td>
                                <td>${o.buyer}</td>
                                <td>${o.invoiceNo}</td>
                                <td><fmt:formatDate value="${o.invoiceDate}" pattern="yyyy-MM-dd"/></td>
                                <td>${o.marks}</td>
                                <td>
                                    <c:if test="${o.state==0}">草稿</c:if>
                                    <c:if test="${o.state==1}"><font color="green">已提交</font></c:if>
                                    <c:if test="${o.state==2}"><font color="red">已上报</font></c:if>
                                    <c:if test="${o.state==3}"><font color="red">已报运</font></c:if>
                                    <c:if test="${o.state==4}"><font color="red">home装箱</font></c:if>
                                    <c:if test="${o.state==5}"><font color="red">待正式装箱</font></c:if>
                                    <c:if test="${o.state==6}"><font color="red">装箱完成</font></c:if>
                                    <c:if test="${o.state==7}"><font color="red">待正式委托</font></c:if>
                                    <c:if test="${o.state==8}"><font color="red">委托完成</font></c:if>
                                    <c:if test="${o.state==9}"><font color="red">待开发票</font></c:if>
                                    <c:if test="${o.state==10}"><font color="red">已开发票</font></c:if>
                                    <c:if test="${o.state==11}"><font color="red">待审核财务</font></c:if>
                                    <c:if test="${o.state==12}"><font color="red">财务审核完毕</font></c:if>
                                    <c:if test="${o.state==13}"><font color="red">订单完成</font></c:if>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                    <!--数据列表/-->
                    <!--工具栏/-->
                </div>
                <!-- 数据表格 /-->
            </div>
            <!-- /.box-body -->

            <!-- .box-footer-->
            <div class="box-footer">
                <jsp:include page="../../common/page.jsp">
                    <jsp:param value="/cargo/shipping/toView.do?" name="pageUrl"/>
                </jsp:include>
            </div>
            <!-- /.box-footer-->
        </div>--%>

    </section>
    <!-- 正文区域 /-->

</div>
<!-- 内容区域 /-->
</body>
<script src="../../plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="../../plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<link rel="stylesheet" href="../../css/style.css">
<script>
    $('#signingDate').datepicker({
        autoclose: true,
        format: 'yyyy-mm-dd'
    });
    $('#deliveryPeriod').datepicker({
        autoclose: true,
        format: 'yyyy-mm-dd'
    });
    $('#shipTime').datepicker({
        autoclose: true,
        format: 'yyyy-mm-dd'
    });
</script>
</html>